home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Misc / DMOEnum / dmoenum.cpp next >
Encoding:
C/C++ Source or Header  |  2001-10-09  |  2.2 KB  |  75 lines

  1. //------------------------------------------------------------------------------
  2. // File: DMOEnum.cpp
  3. //
  4. // Desc: DirectShow sample code - an MFC based application for device 
  5. //       enumeration.
  6. //
  7. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10.  
  11. #include "stdafx.h"
  12. #include "DMOEnum.h"
  13. #include "DMOEnumDlg.h"
  14.  
  15. #ifdef _DEBUG
  16. #define new DEBUG_NEW
  17. #undef THIS_FILE
  18. static char THIS_FILE[] = __FILE__;
  19. #endif
  20.  
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CDMOEnumApp
  23.  
  24. BEGIN_MESSAGE_MAP(CDMOEnumApp, CWinApp)
  25.     //{{AFX_MSG_MAP(CDMOEnumApp)
  26.         // NOTE - the ClassWizard will add and remove mapping macros here.
  27.         //    DO NOT EDIT what you see in these blocks of generated code!
  28.     //}}AFX_MSG
  29.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  30. END_MESSAGE_MAP()
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CDMOEnumApp construction
  34.  
  35. CDMOEnumApp::CDMOEnumApp()
  36. {
  37.     // TODO: add construction code here,
  38.     // Place all significant initialization in InitInstance
  39. }
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // The one and only CDMOEnumApp object
  43.  
  44. CDMOEnumApp theApp;
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CDMOEnumApp initialization
  48.  
  49. BOOL CDMOEnumApp::InitInstance()
  50. {
  51.     // Standard initialization
  52.     // If you are not using these features and wish to reduce the size
  53.     //  of your final executable, you should remove from the following
  54.     //  the specific initialization routines you do not need.
  55.  
  56. #ifdef _AFXDLL
  57.     // In MFC 5.0, Enable3dControls and Enable3dControlsStatic are obsolete because
  58.     // their functionality is incorporated into Microsoft's 32-bit operating systems.
  59. #if (_MSC_VER <= 1200)
  60.     Enable3dControls();            // Call this when using MFC in a shared DLL
  61. #endif
  62. #else
  63.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  64. #endif
  65.  
  66.     CDMOEnumDlg dlg;
  67.     m_pMainWnd = &dlg;
  68.  
  69.     dlg.DoModal();
  70.  
  71.     // Since the dialog has been closed, return FALSE so that we exit the
  72.     //  application, rather than start the application's message pump.
  73.     return FALSE;
  74. }
  75.